package one.bugu.android.demon.util;

import android.content.Context;
import android.os.Build;

/**
 * Created with IntelliJ IDEA.
 * User: LangK
 * Created Date 2018/1/18
 * Time: 15:22
 * Description:
 */
public class ColorUtil {


    public static int getColor(Context context, int color) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            return context.getColor(color);
        } else {
            return context.getResources().getColor(color);
        }
    }
}
